package com.alison.importbean;

import com.alison.CustomBean;
import com.alison.EmployeeProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;

/**
 * @Author alison
 * @Date 2024/3/27 10:42
 * @Version 1.0
 * @Description
 */


@EnableConfigurationProperties({EmployeeProperties.class})
@Import(CustomBean.class)
@SpringBootApplication
public class AppImportBean {

    @Autowired
    CustomBean customBean;

    {
        System.setProperty("emp.name", "tom");
        System.setProperty("emp.age", "11");
        System.setProperty("emp.address", "北京");
    }
}
